package com.zhanglu.fun.services.logcenter.logrouter;

import com.zhanglu.fun.services.logcenter.logservice.LogService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @description 主题日志路由
 * @Auther zhanglu
 * @Date 2017/8/21 下午3:12
 */
@RestController
@RequestMapping("/log")
public class LogRouter {

    @Autowired
    private LogService logService;

    @PostMapping("/info")
    public void logInfo(@RequestBody String info) {
        if (StringUtils.isEmpty(info)) {
            return;
        }
        logService.logInfo(info);
    }
}
